package com.kugou.test.helper;

public class URLHelper {
	String mUrl = new String();
	
	public URLHelper(String baseUrl){
		mUrl = baseUrl;
	}
	
	public void addPath(String path){
		mUrl += path;
	}
	
	public void addParam(String key,String value){
		if(mUrl.contains("?")){
			mUrl += String.format("&%s=%s", key,value);
		} else {
			mUrl += String.format("?%s=%s", key,value);
		}
	}
	
	public String getUrl(){
		return mUrl;
	}
}

